package com.neu.wms.mapper;

import com.neu.wms.dto.RoleDto;
import com.neu.wms.dto.RoleDtoFengSir;
import com.neu.wms.entity.SysRole;
import com.neu.wms.vo.RoleVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author 冯Sir
* @description 针对表【sys_role(角色表)】的数据库操作Mapper
* @createDate 2023-06-26 15:42:49
* @Entity com.neu.wms.entity.SysRole
*/
@Mapper
public interface SysRoleMapper {
    /**
     * @Description 得到所有角色
     * @param
     * @Return java.util.List<com.neu.wms.entity.SysRole>
     * @Author  fengSir
     * @Date    Create by 2023-06-27 14:41
     */
    List<SysRole> selectAll();
    /**
     * @Description 得到当前用户拥有的角色
     * @param uid
     * @Return java.lang.Integer[]
     * @Author  fengSir
     * @Date    Create by 2023-06-27 14:42
     */
    Integer[] selectRoleIdByUid(Integer uid);

    int deleteByPrimaryKey(Long id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    List<RoleVo> selectAll(RoleDto roleDto);

    SysRole queryById(Integer uid);

    /**
     * @Description 删除当前用户拥有的角色
     * @param uid
     * @Return void
     * @Author  fengSir
     * @Date    Create by 2023-06-27 16:23
     */
    void deleteByUid(Integer uid);


    /**
     * @Description 批量插入新角色
     * @param roleDto
     * @Return void
     * @Author  fengSir
     * @Date    Create by 2023-06-27 16:23
     */
    void insertRole(RoleDtoFengSir roleDto);
}
